import service from '@/utils/request'
// @Tags RichText
// @Summary 创建富文本
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RichText true "创建富文本"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /richText/createRichText [post]
export const createRichText = (data) => {
  return service({
    url: '/richText/createRichText',
    method: 'post',
    data,
  })
}

// @Tags RichText
// @Summary 删除富文本
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RichText true "删除富文本"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /richText/deleteRichText [delete]
export const deleteRichText = (params) => {
  return service({
    url: '/richText/deleteRichText',
    method: 'delete',
    params,
  })
}

// @Tags RichText
// @Summary 批量删除富文本
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除富文本"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /richText/deleteRichText [delete]
export const deleteRichTextByIds = (params) => {
  return service({
    url: '/richText/deleteRichTextByIds',
    method: 'delete',
    params,
  })
}

// @Tags RichText
// @Summary 更新富文本
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RichText true "更新富文本"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /richText/updateRichText [put]
export const updateRichText = (data) => {
  return service({
    url: '/richText/updateRichText',
    method: 'put',
    data,
  })
}

// @Tags RichText
// @Summary 用id查询富文本
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.RichText true "用id查询富文本"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /richText/findRichText [get]
export const findRichText = (params) => {
  return service({
    url: '/richText/findRichText',
    method: 'get',
    params,
  })
}

// @Tags RichText
// @Summary 分页获取富文本列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取富文本列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /richText/getRichTextList [get]
export const getRichTextList = (params) => {
  return service({
    url: '/richText/getRichTextList',
    method: 'get',
    params,
  })
}
// @Tags RichText
// @Summary 不需要鉴权的富文本接口
// @accept application/json
// @Produce application/json
// @Param data query request.RichTextSearch true "分页获取富文本列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /richText/getRichTextPublic [get]
export const getRichTextPublic = () => {
  return service({
    url: '/richText/getRichTextPublic',
    method: 'get',
  })
}
